package news.yp.newsproject.network;

import io.reactivex.Flowable;
import news.yp.newsproject.bean.BookRequest;
import news.yp.newsproject.bean.BookResponse;
import news.yp.newsproject.bean.RequestDetailData;
import news.yp.newsproject.bean.RequestPageData;
import news.yp.newsproject.bean.ResponseDetailData;
import news.yp.newsproject.bean.ResponsePageData;
import news.yp.newsproject.bean.ResponseSectionData;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;

public interface ApiServiceFactor {
    /**
     * http://45.78.45.3:5000/getpagedata
     * http://45.78.45.3:5000/getcontent
     * http://45.78.45.3:5000/getsection
     *
     * @return
     */
    String url = "http://45.78.45.3:5000/";
    String bookurl = "http://132.232.23.157:5000/";

    @GET("getsection")
    Flowable<ResponseSectionData> requestSection();

    @POST("getpagedata")
    Flowable<ResponsePageData> requestPagedata(@Body RequestPageData requestPageData);

    @POST("getcontent")
    Flowable<ResponseDetailData> requestDetailData(@Body RequestDetailData requestDetailData);

    //请求书籍
    @POST("getbooks")
    Flowable<BookResponse> requestBookPageData(@Body BookRequest bookRequest);

}
